package com.smart.fourteen.mybatis.mapperscanner;

import com.smart.fourteen.mybatis.dao.TopicDao;
import com.smart.fourteen.mybatis.model.Topic;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author junrui.wang
 * @create 2019/11/13
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("com/smart/fourteen/mybatis/mapperscanner/applicationContext-mybatis.xml");
        TopicService topicService = (TopicService) ac.getBean("topicService");
        Topic topic = topicService.getTopic(1);
        System.out.println(topic);


    }
}
